package com.master.train.member.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 乘车人
 * 
 * @author master
 * @email 3221057417@qq.com
 * @date 2025-07-02 18:01:07
 */
@Data
@TableName("passenger")
public class PassengerEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * id
	 */
	@TableId
	@JsonSerialize(using = ToStringSerializer.class)
	private Long id;
	/**
	 * 会员id
	 */
	@JsonSerialize(using = ToStringSerializer.class)
	private Long memberId;
	/**
	 * 姓名
	 */
	@NotBlank(message = "姓名不能为空")
	private String name;
	/**
	 * 身份证
	 */
	@NotBlank(message = "身份证不能为空")
	private String idCard;
	/**
	 * 旅客类型|枚举[PassengerTypeEnum]
	 */
	@NotBlank(message = "旅客类型不能为空")
	private String type;
	/**
	 * 新增时间
	 */
	private Date createTime;
	/**
	 * 修改时间
	 */
	private Date updateTime;

}
